package com.portal4kids.view;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.portal4kids.controller.CalendarManager;
import com.portal4kids.controller.PartyManager;
import com.portal4kids.model.Calendars;
import com.portal4kids.model.Party;

public class PartyAction extends ActionSupport{
	private Party party;
	private PartyManager partyController;
	private List<Party> partyList = new ArrayList<Party>();
	
	public PartyAction(){
		partyController = new PartyManager();
	}
	public String execute(){
		return SUCCESS;		
	}
	
	public String saveParty(){
		party = partyController.saveParty(getParty());
		return SUCCESS;		
	}
	
	public String searchParty(){
		partyList = partyController.getPartyFromDB(getParty());
		return SUCCESS;		
	}
	
	
	public Party getParty() {
		return party;
	}
	public void setParty(Party party) {
		this.party = party;
	}
	public List<Party> getPartyList() {
		return partyList;
	}
	public void setPartyList(List<Party> partyList) {
		this.partyList = partyList;
	}
	
	

}
